package com.yjzx.care.base;

import com.yjzx.care.functional.ToBoolFunction;

import java.util.function.BooleanSupplier;
import java.util.function.Consumer;

/**
 * @author yjzx
 * @description constant
 * @since 2025/6/19
 */
public interface Constant {
    BooleanSupplier JUDGE_TO_TRUE = () -> true;
    ToBoolFunction<?> JUDGE_O_TO_TRUE = x -> true;
    Consumer<?> LOOP_BODY = x->{};

    static <T>ToBoolFunction<T> judgeObjToTrue() {
        return (ToBoolFunction<T>)JUDGE_O_TO_TRUE;
    }
    static <T>Consumer<T> loopBody() {
        return (Consumer<T>)LOOP_BODY;
    }
}
